//复制接口的参数变化
//sourceType1
export function copyDataType(source: any, target: any, sourceName: any, copyType: any, connectionId: any) {
  let targetID;
  if (target.IsdbData) {
    targetID = target.ID;
  } else {
    targetID = null;
  }
  let fromData = {
    sourceID: source.ID, //source.ID
    sourceName: sourceName || source.Name, //source.Name
    fonds_Code: source.Fonds_Code,
    sourceFonds_ID: source.Fonds_ID, //source.Fonds_ID
    sourceCatalogType: source.WD_Key,
    sourceType: source.Type, //source.Type
    sourceFather_ID: source.Father_ID,
    sourceIsdbData: source.IsdbData,
    targetID: targetID, //target.ID
    targetFonds_ID: target.Fonds_ID,
    upOneLevel_ID: target.UpOneLevel_ID,
    targetCatalogType: target.WD_Key,
    targetType: target.Type, //target.Type
    copyType: copyType > 1 ? 1 : copyType, //0复制内容,1复制为子级
    clientUser: connectionId
  };
  return fromData;
}
//抛出方法
export default {
  copyDataType
};
